package com.homework6.service;

import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.homework6.mapper.UserMapper;
import com.homework6.po.User;

@Service
public class UserServiceImpl implements UserService {

	@Autowired
	private UserMapper userMapper;
	@Override
	public User findUserById(int id) {
		return userMapper.findUserById(id);
	}
	@Override
	public List<User> findUserByIds(List user) {
		return userMapper.findUserByIds(user);
	}
	@Override
	public List<User> findUserByName(User user) {
		return userMapper.findUserByName(user);
	}
	@Override
	public List<User> findUserByIdsHashMap(HashMap<String, Object> map) {
		return userMapper.findUserByIdsHashMap(map);
	}
	@Override
	public int updateUser(User user) {
		return userMapper.updateUser(user);
	}
	@Override
	public int addUser(User User) {
		return userMapper.addUser(User);
	}
	@Override
	public User findUserOrdersByName(String name) {
		// TODO Auto-generated method stub
		return userMapper.findUserOrdersByName(name);
	}
	@Override
	public User findUserOrderProductByName(String name) {
		// TODO Auto-generated method stub
		return userMapper.findUserOrderProductByName(name);
	}
}
